def pt(str):
    print('|' + str + '|')
    return


############################
####### Python关键字 #######
# False class finally is return
# None continue for lambda try
# True def from nonlocal while
# and del global not with
# as elif if or yield
# assert else import pass
# break except in raise
############################


# 变量声明
message = "helloWorld"
print(message)
# python 不区分单引号双引号
message = 'helloWorld'
print(message)

# Python使用下划线区分多个单词
user_name = '张三'
pt(user_name)

# String
# 单词首字母变大写  str 是系统默认函数
name = 'wang yajie'
print(name.title())
# 大小写转换
print(name.upper())
print(name.lower())
# 删除空白
# 还有左去除,右去除
s = '  has empty      '
pt(s.strip())
pt(s.lstrip())
pt(s.rstrip())

first_name = '王'
last_name = '亚杰'
print(first_name + last_name)
print(first_name + '\t' + last_name)
print(first_name + '\n' + last_name)

# 引号问题
print('wyj\'1')
print("wyj'1")
print('wyj"1')
print("wyj\"1")

# Numbers
print(2 + 3)
print(10 / 3)
print(10.1 / 3)

print(2 * 4)
print(2 << 4)
print(8 >> 2)

# 类型转换, string不能直接和number直接+ 需要使用str()函数

age = 23
name = '王亚杰'
message = name + str(age) + name
print(message)
